Platform Explorer / Nuxeo Platform LTS 2017 9.10

Contribution org.nuxeo.ecm.platform.routing.actions--filters

This contribution is part of XML component org.nuxeo.ecm.platform.routing.actions inside nuxeo-routing-web-9.10.jar /OSGI-INF/document-routing-actions-contrib.xml

Extension Point

Extension point filters of component ActionService.

Contributed Items

  • <filter append="true" id="create">
          <rule grant="true">
            <permission>AddChildren</permission>
            <type>DocumentRoute</type>
            <type>StepFolder</type>
          </rule>
        </filter>
  • <filter id="isRoutable">
          <rule grant="true">
            <condition>#{routingActions.isRoutable()}</condition>
          </rule>
        </filter>
  • <filter id="isRoute">
          <rule grant="true">
            <type>DocumentRoute</type>
          </rule>
        </filter>
  • <filter id="isNotRoute">
          <rule grant="false">
            <type>DocumentRoute</type>
          </rule>
        </filter>
  • <filter id="isDraftRouteModel">
          <rule grant="true">
            <condition>
              document.getCurrentLifeCycleState().equals("draft")
            </condition>
            <type>DocumentRoute</type>
          </rule>
        </filter>
  • <filter id="isEditableRoute">
          <rule grant="true">
            <condition>#{userSession.administrator}</condition>
          </rule>
          <rule grant="true">
            <group>routeManagers</group>
          </rule>
          <rule grant="true">
            <permission>Manage everything</permission>
          </rule>
        </filter>
  • <filter id="isValidatedRouteModel">
          <rule grant="true">
            <condition>
              document.getCurrentLifeCycleState().equals("validated")
            </condition>
            <type>DocumentRoute</type>
          </rule>
        </filter>
  • <filter id="noRelatedRouteStarted">
          <rule grant="false">
            <condition>#{routingActions.hasRelatedRoute()}</condition>
          </rule>
        </filter>
  • <filter id="hasRelatedRouteStarted">
          <rule grant="true">
            <condition>#{routingActions.hasRelatedRoute()}</condition>
          </rule>
        </filter>
  • <filter id="isNotRunning">
          <rule grant="false">
            <condition>
              document.getCurrentLifeCycleState().equals("running")
            </condition>
          </rule>
        </filter>
  • <filter id="isNotImutableConditionalStructure">
          <rule grant="false">
            <condition>
              #{documentManager.getParentDocument(document.getRef()).hasFacet("ConditionalStepFolder")}
            </condition>
          </rule>
        </filter>
  • <filter id="isNotDraftRouteModel">
          <rule grant="false">
            <condition>
              !(document.getCurrentLifeCycleState().equals("draft"))
            </condition>
            <type>DocumentRoute</type>
            <type>StepFolder</type>
          </rule>
        </filter>
  • <filter id="currentUserIsWorkflowInitatior">
          <rule grant="true">
            <condition>currentUser.administrator</condition>
            <condition>
              #{routingActions.getCurrentWorkflowInitiator().equals(currentUser.getName())}
            </condition>
          </rule>
        </filter>

XML Source

<extension point="filters" target="org.nuxeo.ecm.platform.actions.ActionService">

    <filter append="true" id="create">
      <rule grant="true">
        <permission>AddChildren</permission>
        <type>DocumentRoute</type>
        <type>StepFolder</type>
      </rule>
    </filter>

    <filter id="isRoutable">
      <rule grant="true">
        <condition>#{routingActions.isRoutable()}</condition>
      </rule>
    </filter>

    <filter id="isRoute">
      <rule grant="true">
        <type>DocumentRoute</type>
      </rule>
    </filter>

    <filter id="isNotRoute">
      <rule grant="false">
        <type>DocumentRoute</type>
      </rule>
    </filter>

    <filter id="isDraftRouteModel">
      <rule grant="true">
        <condition>
          document.getCurrentLifeCycleState().equals("draft")
        </condition>
        <type>DocumentRoute</type>
      </rule>
    </filter>

    <filter id="isEditableRoute">
      <rule grant="true">
        <condition>#{userSession.administrator}</condition>
      </rule>
      <rule grant="true">
        <group>routeManagers</group>
      </rule>
      <rule grant="true">
        <permission>Manage everything</permission>
      </rule>
    </filter>


    <filter id="isValidatedRouteModel">
      <rule grant="true">
        <condition>
          document.getCurrentLifeCycleState().equals("validated")
        </condition>
        <type>DocumentRoute</type>
      </rule>
    </filter>

    <filter id="noRelatedRouteStarted">
      <rule grant="false">
        <condition>#{routingActions.hasRelatedRoute()}</condition>
      </rule>
    </filter>

    <filter id="hasRelatedRouteStarted">
      <rule grant="true">
        <condition>#{routingActions.hasRelatedRoute()}</condition>
      </rule>
    </filter>

    <filter id="isNotRunning">
      <rule grant="false">
        <condition>
          document.getCurrentLifeCycleState().equals("running")
        </condition>
      </rule>
    </filter>

    <filter id="isNotImutableConditionalStructure">
      <rule grant="false">
        <condition>
          #{documentManager.getParentDocument(document.getRef()).hasFacet("ConditionalStepFolder")}
        </condition>
      </rule>
    </filter>

    <filter id="isNotDraftRouteModel">
      <rule grant="false">
        <condition>
          !(document.getCurrentLifeCycleState().equals("draft"))
        </condition>
        <type>DocumentRoute</type>
        <type>StepFolder</type>
      </rule>
    </filter>

    <filter id="currentUserIsWorkflowInitatior">
      <rule grant="true">
        <condition>currentUser.administrator</condition>
        <condition>
          #{routingActions.getCurrentWorkflowInitiator().equals(currentUser.getName())}
        </condition>
      </rule>
    </filter>

  </extension>